#include <iostream>
using namespace std;

int main()
{
	double num;
	while (cin >> num && num) {
		int i = 2;
		for (double sum = 0; sum < num; sum += 1.0/i++);
		cout << i - 2 << " card(s)" << endl;
	}
	return 0;
}
